Apple Pay Code

PHP, Node.js, Python, and Java examples for embedded Apple Pay integration.

With Hosted Checkout, Apple Pay is displayed automatically on the DigetPay payment page.

With Embedded Integration, you build the checkout on your own domain, render the Apple Pay button, validate the merchant session with Apple, receive the Apple Pay payment token, then securely send the payment request from your backend to DigetPay.

🚧

Embedded Integration Only

These examples apply only to merchants using Embedded Integration.

Do not use these examples with Hosted Checkout integrations.

❗️

Security Notice

Never send Apple Pay payment tokens directly from browser JavaScript to DigetPay.

Always send the payment token to your backend first, then call DigetPay APIs securely from your server.

📘

Before you begin

Make sure you have completed:

  • Apple Pay Embedded setup
  • Merchant ID configuration
  • Domain verification
  • Embedded Integration
  • Fin API Key
  • HTTPS enabled

Hosted vs Embedded

Hosted CheckoutEmbedded Integration
Checkout UIDigetPayYour website
Apple Pay ButtonDigetPay renders itYou render it
Merchant ValidationDigetPayYour server
Apple Pay TokenDigetPayYour server
Server IntegrationMinimalRequired
Domain VerificationDigetPayYour domain


Staging vs production

EnvironmentAPI base
Fin staginghttps://fin-api.digetpay.com/v1
Productionhttps://api.digetpay.com/v1

Next steps




Did this page help you?